﻿using DTcms.Common;
using DTcms.Web.Mvc.UI;
using System.Web.Mvc;

namespace DTcms.Web.Mvc.Areas.Admin.Controllers
{
    public class CenterController : ManageController
    {
        //
        // GET: /Admin/Center/
        public ActionResult Index()
        {
            Model.manager admin_info = GetAdminInfo(); //管理员信息
                                                       //登录信息
            if (admin_info != null)
            {
                BLL.manager_log bll = new BLL.manager_log();
                Model.manager_log model1 = bll.GetModel(admin_info.user_name, 1, DTEnums.ActionEnum.Login.ToString());
                if (model1 != null)
                {
                    //本次登录
                    ViewBag.litIP = model1.user_ip;
                }
                Model.manager_log model2 = bll.GetModel(admin_info.user_name, 2, DTEnums.ActionEnum.Login.ToString());
                if (model2 != null)
                {
                    //上一次登录
                    ViewBag.litBackIP = model2.user_ip;
                    ViewBag.litBackTime = model2.add_time.ToString();
                }
            }
            ViewBag.LitUpgrade = FileHelper.GetDomainStr(DTKeys.CACHE_OFFICIAL_UPGRADE, DESEncrypt.Decrypt(DTKeys.FILE_URL_UPGRADE_CODE, "DT"));
            ViewBag.LitNotice = FileHelper.GetDomainStr(DTKeys.CACHE_OFFICIAL_NOTICE, DESEncrypt.Decrypt(DTKeys.FILE_URL_NOTICE_CODE, "DT"));
            return View(siteConfig);
        }
        
        public ActionResult Ie6update()
        {
            return View();
        }

        public ActionResult tpl_message()
        {
            return View();
        }

        public ActionResult tpl_note()
        {
            return View();
        }

        public ActionResult tpl_theme()
        {
            return View();
        }

        public ActionResult tpl_lock_screen()
        {
            return View();
        }
    }
}
